sorry if this seems trivial, but ima beginner, its not really about the Text (its in German due to me studying there )
The "program" is should calculate the surface area, the extend and the diagonal line.
Somehow its not calculating my operations, and just outputs 0's
I dont quiet know what's wrong :|
Code:
#include <stdio.h>
#include <math.h>
int main()
{
double h, b, diagonale, umfang, flaeche;
do
{
umfang = 0;
flaeche = 0;
diagonale = 0;
printf("\nGeben sie die Seitenlängen eines Rechtecks an (HxB)\n");
scanf("%lf %lf",&h, &b);
// Berechnung und Ausgabe der Diagonalen
sqrt(pow(h,2) + pow(b,2)) == diagonale;
printf("\nDie Diagonale des eingegebenen Rechtecks ist %lf\n", diagonale);
// Berechnung und Ausgabe von Umfang
printf("\nDer Umfang des eingegebenen Rechtecks ist %lf\n", 2*h+2*b=umfang);
// Berechnung und Ausgabe von der Fäche
h*b == flaeche;
printf("\nDie Fläche des eingegebenen Rechtecks ist %lf\n", flaeche);
}
while (h,b >= 0);
return 0;
}
Thanks for reading and maybe helping me out!